-- GENERATED SPELL FOR [Sporeggar Preserver] --


function spell0_18139(pUnit, Event) --@Faerie Fire,n/a--
pUnit:FullCastSpellOnTarget(6950,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18139', 2000, 1)
end

function spell1_18139(pUnit, Event) --@Sporeskin,Self--
pUnit:FullCastSpellOnTarget(35230,pUnit)
pUnit:RegisterEvent('Sorts_18139', 576, 1)
end

function Sorts_18139(pUnit, Event)
local choix_sorts_18139 = math.random(0, 1)
if choix_sorts_18139 == 0 then
pUnit:RegisterEvent('spell0_18139', 1, 1)
end
if choix_sorts_18139 == 1 then
pUnit:RegisterEvent('spell1_18139', 1, 1)
end
end

function mob18139_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18139', math.random(1500, 3000), 1)
end

function mob18139_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18139_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18139_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18139, 1, 'mob18139_Action')
RegisterUnitEvent(18139, 2, 'mob18139_Leave')
RegisterUnitEvent(18139, 3, 'mob18139_Kill')
RegisterUnitEvent(18139, 4, 'mob18139_Die')
